﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TN_CMS.Core.Entities;

namespace TN_CMS.Core.Abstract
{
    public interface ISysAdminRepository
    {
        IQueryable<SysAdmin> SysAdmins { get; }

        /// <summary>
        /// Get system admin by page
        /// </summary>
        /// <param name="page">page index</param>
        /// <param name="pageSize">Page size</param>
        /// <returns></returns>
        IQueryable<SysAdmin> GetList(out int total, int page = 0, int pageSize = 10, bool getInactive = false);

        /// <summary>
        /// Get system admin by AdminId
        /// </summary>
        /// <param name="Id">AdminId</param>
        /// <returns></returns>
        SysAdmin GetDetail(int id, bool getInactive = false);

        /// <summary>
        /// Save system admin, use to update or create new system admin
        /// </summary>
        /// <param name="admin">SysAdmin entity</param>
        /// <param name="actorId">AdminId, who save this admin</param>
        /// <returns></returns>
        void Save(SysAdmin admin, int actorId);

        /// <summary>
        /// Delete system admin
        /// </summary>
        /// <param name="Id">SysAdmin Id</param>
        /// <returns></returns>
        void Delete(int[] ids);

        /// <summary>
        /// Deactive admin
        /// </summary>
        /// <param name="id"></param>
        void ChangeActiveStatus(int[] ids, bool isActive);
    }
}
